﻿<UserControl x:Class="TouchBehaviorsSampleApp.UserControls.EllipseItem"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml">
    <UserControl.Resources>
        <Style TargetType="CheckBox">
            <Setter Property="FontSize" Value="9"/>
            <Setter Property="IsChecked" Value="True"/>
        </Style>
        <Style x:Key="NullButtonStyle" TargetType="Button">
            <Setter Property="Template">
                <Setter.Value>
                    <ControlTemplate TargetType="Button">
                        <ContentPresenter/>
                    </ControlTemplate>
                </Setter.Value>
            </Setter>
        </Style>
    </UserControl.Resources>

    <Grid Width="Auto" Height="Auto">
        <Ellipse Fill="White" Stroke="Black" StrokeThickness="1" HorizontalAlignment="Stretch" VerticalAlignment="Stretch" />
        <Ellipse x:Name="DeadZone">
            <Ellipse.Fill>
                <RadialGradientBrush>
                    <GradientStop Offset="0" Color="#00FF0000"/>
                    <GradientStop Offset="0.7" Color="#00FF0000"/>
                    <GradientStop Offset="1" Color="#60FF0000"/>
                </RadialGradientBrush>
            </Ellipse.Fill>
        </Ellipse>
        <Button x:Name="PivotButton" Style="{StaticResource NullButtonStyle}">
            <Ellipse Width="15" Height="15">
                <Ellipse.Fill>
                    <RadialGradientBrush GradientOrigin="0.4,0.4">
                        <GradientStop Offset="0" Color="White"/>
                        <GradientStop Offset="0.5" Color="Gray"/>
                        <GradientStop Offset="1" Color="Black"/>
                    </RadialGradientBrush>
                </Ellipse.Fill>
            </Ellipse>
        </Button>
        <StackPanel VerticalAlignment="Bottom" HorizontalAlignment="Center" Margin="10">
            <CheckBox x:Name="CanTranslateCheckBox" 
        IsChecked="True"
        Content="Translate" Unchecked="CanTranslate_Checked" Checked="CanTranslate_Checked" />
            <CheckBox x:Name="CanRotateCheckBox"
        IsChecked="True"
        Content="Rotate" Unchecked="CanRotate_Checked" Checked="CanRotate_Checked" />
            <CheckBox x:Name="CanScaleCheckBox"
        IsChecked="True"
        Content="Scale" Unchecked="CanScale_Checked" Checked="CanScale_Checked" />
        </StackPanel>
    </Grid>
</UserControl>
